package org.zhangsh.spring.aware;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * </p>
 *
 * @author zhangsh
 * @version 1.0.0
 * @since 2019-03-27
 */
@Component
public class DemoApplicationContextAware implements ApplicationContextAware {

    public DemoApplicationContextAware(){
        System.out.println("我是ApplicationContextAware init...");
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {

        System.out.println("ApplicationContextAware(setApplicationContext)方法实例化...");

    }
}
